package com.atguigu.gmall.cart.client;

import com.atguigu.gmall.model.cart.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(name = "service-cart")
public interface CartFeignClient {
    //加入购物车
    @GetMapping("/api/cart/addCart/{skuId}/{skuNum}")
    public void addCart(@PathVariable Long skuId, @PathVariable Integer skuNum);
    //加入购物车 查询
    @GetMapping("/api/cart/toCart/{sId}/{sNum}")
    public CartInfo toCart(@PathVariable Long sId, @PathVariable Integer sNum);

    //查询选中的购物车
    @GetMapping("/api/cart/findCartInfoListAndChecked")
    public List<CartInfo> findCartInfoListAndChecked();
}
